package com.walkingfiles.registry


class Document {

	DocumentType type
	String number
	DocumentSubject subject
	String description
	Date date
	
	SignerType signerType
	String signer
	
	Area sourceArea
	Area destinationArea

	Area currentArea
	Transfer transfer

	Boolean outbox

	Date modifiedDate
	
	DocumentState state
	
	static hasMany = [files: File, log: LogItem]

    // area inicio
	// area actual
	
	//Long parts
	//Long pages
	
	//Date deadline
	
	// Estado
	
	// file
	
	static constraints = {
	    number(blank:false)
	    description(maxSize:511)
	    transfer(nullable:true)
	destinationArea(nullable:true)
    }
	
	static mapping = {
		table 'Documents'
	}
	
	String toString() {
		number
	}
	
}